<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page language="java" import="java.util.*"%>
<%@page language="java" import="com.base.myproject.client.jdbc.*"%>
<%@page language="java" import="com.base.myproject.server.*"%>
<%@page language="java" import="com.base.myproject.client.jdbc.DataSet"%>
<%@page language="java" import="com.base.myproject.server.tools.*"%>
<%@page language="java"
	import="com.base.myproject.server.GreetingServiceImpl"%>
<%@page language="java"
	import="com.base.myproject.client.busi.service.Associator"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style type="text/css">
<!--
.STYLE2 {color: #0000FF; }
.STYLE3 {color: #0000FF; font-size: x-large; }
.STYLE4 {
	color: #0000FF;
	font-size: 12px;
}
-->
</style>
<%
	String bcode = request.getParameter("bcode");
	DataSetTool DST = new DataSetTool();
	String sql = "select bname as Cname,hr_firstname_en+hr_lastname_en as Ename,Identifier+bcode as " + 
	"bcodeNum,departments as Cdepartment,enName as Edepartment,bcodeimagepath as image from(select bcode,bname,Identifier,hr_firstname_en,hr_lastname_en ,departments " +
	"from bcode where bcode='"+bcode+"')as a,(select bcodeimagepath from bcode_images where bcode='"+bcode+"')as b,(select enName from Systeminfo where id=(select systemid from bcode " +
	"where bcode='"+bcode+"')) as c";
	DataSet ds = DST.getDataSet(sql);
	
	String cname = " ",ename = " ",bcodenum = " ",cdepartment = " ",edepartment = " ",imagepath="";
	if(ds.getRowCount() > 0){
		cname = ds.getValue(0,"Cname");
		ename = ds.getValue(0,"Ename") != null ? ds.getValue(0,"Ename") : " ";
		bcodenum = ds.getValue(0,"bcodeNum");
		cdepartment = ds.getValue(0,"Cdepartment");
		edepartment = ds.getValue(0, "Edepartment") != null ? ds.getValue(0, "Edepartment") : " ";
		imagepath = ds.getValue(0,"image"); 
	}else
		System.out.println("找不到员工照片");
%>
</head>

<body>
<table width="447" height="267" border="0">
  <tr>
    <td height="57" colspan="3"><p align="center" class="STYLE3">NEW WORLD</p>
    </td>
  </tr>
  <tr>
    <td width="134">姓名：</td>
    <td width="159"><%=cname %></td>
    <td width="150" rowspan="6"><table width="140" height="178" border="0">
      <tr>
        <td height="140">&nbsp;<img alt="<%=cname %>" src="<%=imagepath %>" style="width:140px;height:178px"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>Name：</td>
    <td><%=ename %></td>
  </tr>
  <tr>
    <td>员工号：</td>
    <td rowspan="2"><%=bcodenum %></td>
  </tr>
  <tr>
    <td>StaffID No.</td>
  </tr>
  <tr>
    <td>部门：</td>
    <td><%=cdepartment %></td>
  </tr>
  <tr>
    <td>Department：</td>
    <td><%=edepartment %></td>
  </tr>
</table>
</body>
</html>
